package com.fqgj.sentry.policy.server.policy.data;

import com.fqgj.common.utils.JSONUtils;

public class Decision {

    /**
     * id
     */
    Integer decisionId;
    /**
     * 决策名（唯一）
     */
    String decisionName;
    /**
     * 结果类型：1:拒绝  2:人工 3:通过
     */
    Integer decisionType;
    /**
     * 优先级
     */
    Integer priority;

    public Decision() {
    }

    public Decision(Integer decisionId, String decisionName, Integer priority) {
        this.decisionId = decisionId;
        this.decisionName = decisionName;
        this.priority = priority;
    }
    public Decision(Integer decisionId, String decisionName, Integer priority, Integer decisionType) {
        this.decisionId = decisionId;
        this.decisionName = decisionName;
        this.priority = priority;
        this.decisionType = decisionType;
    }

    public Integer getDecisionId() {
        return decisionId;
    }

    public Decision setDecisionId(Integer decisionId) {
        this.decisionId = decisionId;
        return this;
    }

    public String getDecisionName() {
        return decisionName;
    }

    public Decision setDecisionName(String decisionName) {
        this.decisionName = decisionName;
        return this;
    }

    public Integer getPriority() {
        return priority;
    }

    public Decision setPriority(Integer priority) {
        this.priority = priority;
        return this;
    }

    public Integer getDecisionType() {
        return decisionType;
    }

    public Decision setDecisionType(Integer decisionType) {
        this.decisionType = decisionType;
        return this;
    }

    public static void main(String[] args) {
        Decision decision = new Decision();
        decision.setPriority(1).setDecisionId(1).setDecisionName("reject");
        try {
            System.out.println(JSONUtils.obj2json(decision));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
